package services

import (
	"context"
	"fmt"

	"codingq92.com/thrift_demo/gen/thrift/params"
)

type ThriftServerImpl struct{}

func (t *ThriftServerImpl) HelloWorld(ctx context.Context, message string) (string, error) {

	fmt.Println("接收到client的消息>>>", message)

	return "Hello " + message, nil
}

func (t *ThriftServerImpl) HelloWorldWithResp(ctx context.Context, msg string) (*params.HelloWorldResponse, error) {

	fmt.Println("接收到client的消息>>>", msg)

	return &params.HelloWorldResponse{RespMsg: "return " + msg}, nil
}
